package com.fanrui.code.chess;

import com.fanrui.code.player.Player;
import com.fanrui.proto.cmd.ResJoinMahjongRoom.Result;

/**
 * 棋牌游戏牌桌
 * @author Administrator
 *
 */
public interface IChessTable<CARD extends IChessCard,GAMER extends IChessGamer<CARD>,GAMERULES extends IChessGameRules> extends ITable {

	/**  
	*  根据玩家ID获取棋牌玩家
	*  @param playerID
	*  @return    
	*  IChessGamer    
	*/  
	public GAMER getGamerByPlayerID(long playerID);
	
	/**  
	*  根据座位号获取玩家
	*  @param seatNO
	*  @return    
	*  IChessGamer    
	*/  
	public GAMER getGamerBySeatNO(int seatNO);
	
	/**  
	*  加入房间
	*  @param playerID
	*  @return    
	*  Object    
	*/  
	public Result enter(Player player);
	
	/**  
	*  解散房间 
	*  void    
	*/  
	public void dissolve();
	
	/**  
	*  获取牌桌创建时间
	*  @return    
	*  long    
	*/  
	public long getCreateTime();
	
}
